<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/hello',function() {
	return "welcome to buffalo's website";
});

Route::get('/', function() {
    return '';
});

Route::get('/login/index', 'LoginController@index');
Route::post('/login/login', 'LoginController@login');
Route::get('/short/redirect', 'ShortController@redirect');

Route::get('/{route}', 'ShortController@redirect')->where('route', '[a-zA-Z0-9]+');

Route::middleware('AuthAdmin')->group(function(){
    Route::get('/short/getAccessLog', 'ShortController@getAccessLog');
    Route::get('/short/list', 'ShortController@list');
    Route::get('/short/detail', 'ShortController@detail');
    Route::post('/short/del', 'ShortController@del');
    Route::post('/short/add', 'ShortController@add');
    Route::post('/short/delData', 'ShortController@delData');
    Route::post('/short/saveData', 'ShortController@saveData');
    Route::get('/short/getList', 'ShortController@getList');
    Route::get('/short/getOne', 'ShortController@getOne');
    Route::post('/short/copy', 'ShortController@copy');
//    Route::get('/community/getList', 'CommunityController@getList');
//    Route::get('/community/getOne', 'CommunityController@getOne');
//    Route::get('/community/edit', 'CommunityController@edit');
//    Route::get('/community/getFile/{id}', 'CommunityController@getFile');
//    Route::get('/', 'CommunityController@index');
//    Route::get('/community/detail', 'CommunityController@detail');
//    Route::get('/community/drawing', 'CommunityController@drawing');
//    Route::post('/community/save', 'CommunityController@save');
//    Route::post('/community/upload', 'CommunityController@upload');
//    Route::post('/community/del', 'CommunityController@del');
//
//    Route::get('/building', 'BuildingController@index')->name('building');
//    Route::get('/building/detail', 'BuildingController@detail');
//    Route::get('/building/getList', 'BuildingController@getList');
//    Route::get('/building/getOne', 'BuildingController@getOne');
//    Route::post('/building/save', 'BuildingController@save');
//    Route::post('/building/roomSave', 'BuildingController@roomSave');
//
//    Route::post('room/save', 'RoomController@save');
});
